{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>充值记录</h5>
        </div>
        <div class="ibox-content">
            <!--搜索框开始-->
            <div class="row">
                <div class="col-sm-12">

                    <form class="layui-form">
                        <div class="col-sm-3">
                            <div class="input-group">
                                <select name="admin_id">
                                    <option value="">--- 全部 ---</option>
                                    {foreach name="system" id="value"}
                                    <option value="{$value['id']}">{$value['name']}</option>
                                    {/foreach}
                                </select>
                                <span class="input-group-btn"> 
                                    <button type="submit" class="layui-btn btn-primary"
                                            style="border-radius: 0 3px 3px 0" lay-submit lay-filter="search"><i
                                            class="fa fa-search"></i> 搜索</button>
                                </span>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!--搜索框结束-->
            <div class="example-wrap">
                <div class="example">
                    <table class="layui-table"
                           lay-data="{id:'recharge',height:'full-240',url:'recharge_log',method:'post',page:true,limits:[15,25,35,45,55,65,75,85,95],limit:15}"
                           lay-filter="recharge">
                        <thead>
                        <tr>
                            <th lay-data="{title:'ID',field:'id',fixed:true,align:'center',width:60}"></th>
                            <th lay-data="{title:'名称',field:'title',align:'left',width:120}"></th>
                            <th lay-data="{title:'账号',field:'account',align:'left',width:120}"></th>
                            <th lay-data="{title:'等级',field:'group_name',align:'center',width:120}"></th>
                            <th lay-data="{title:'姓名',field:'name',align:'center',width:120}"></th>
                            <th lay-data="{title:'性别',field:'sex',align:'center',width:60}"></th>
                            <th lay-data="{title:'头像',field:'head_img',templet:'#head_img',align:'center',width:80}"></th>
                            <th lay-data="{title:'购物积分',field:'gouwu_integral',align:'center',width:120,sort:true}"></th>
                            <th lay-data="{title:'注册积分',field:'reg_integral',align:'center',width:120,sort:true}"></th>
                            <th lay-data="{title:'购车积分',field:'gouche_integral',align:'center',width:120,sort:true}"></th>
                            <th lay-data="{title:'操作类型',field:'type',align:'center',width:120}"></th>
                            <th lay-data="{title:'操作金额',field:'integral',templet:'#integral',align:'center',width:120}"></th>
                            <th lay-data="{title:'操作后余额',field:'balance',align:'center',width:120,sort:true}"></th>
                            <th lay-data="{title:'操作员(账号)',field:'username',align:'center',width:120}"></th>
                            <th lay-data="{title:'操作员(等级)',field:'admin_group_name',align:'center',width:120}"></th>
                        </tr>
                        </thead>
                    </table>
                    <script type="text/html" id="head_img">
                        <img src="/public/uploads/face/{{d.head_img}}" alt=""
                             style="height: 28px;border-radius: 50%;border: 1px solid #E6E6E6;">
                    </script>
                    <script type="text/html" id="integral">
                        {{# if(d.integral>0){ }}
                        <font color="green">{{d.integral}}</font>
                        {{# }else{ }}
                        <font color="red">{{d.integral}}</font>
                        {{# } }}
                    </script>
                </div>
            </div>
            <!-- End Example Pagination -->
        </div>
    </div>
</div>
<!-- End Panel Other -->

<!-- 加载动画 -->
<div class="spiner-example">
    <div class="sk-spinner sk-spinner-three-bounce">
        <div class="sk-bounce1"></div>
        <div class="sk-bounce2"></div>
        <div class="sk-bounce3"></div>
    </div>
</div>

{include file="public/footer" /}

<script type="text/javascript">
    var form = layui.form, table = layui.table;
    $(".spiner-example").css('display', 'none'); //数据加载完关闭动画

    form.on('submit(search)', function (data) {
        var data = data.field;
        table.reload('recharge', {
            where: data
        });
        return false;
    })
</script>
</body>
</html>